home *** CD-ROM | disk | FTP | other *** search
-
- u0ô > &.SourceCode.Alphabet01
- u:'ô Author : G L Fitton
- uD-ô Copyright : ABABCUS TRAINING
- uN)ô Version 1.00 : 1st May 1988
- uX:
- ub9ô The source code for a simple machine code programme
- ul/ô which systematically prints the alphabet.
- uv:ô Can be used to demonstrate the BreakPts01 programme.
- u€:
- u⇩ë 0
- u“@Þ dummy% (&10000-¸P-&24) :ô A dummy byte array.
- ufiDÞ code% &200 :ô Place code% at &10000.
- u¨:
- u²Aendofcode%=¤_Alphabet01(code%) :ô Assemble the code.
- u¼Cÿ("SAVE &.ObjectCode.Alphabet01 "+Ã~(code%)+" "+Ã~(endofcode%))
- uÆ,*SETTYPE &.ObjectCode.Alphabet01 &FFC
- uÐ'*STAMP &.ObjectCode.Alphabet01
- uÚ:
- uäñ'
- uî*MemoryI 10000 +30
- uø:
- và
- v:
- vÝ ¤_Alphabet01(start%)
- v %ô Prints the upper case alphabet.
- v*ê sp,pass%,print
- v4:
- v>ô Use the BASIC stack.
- vH)sp = 13 : ô Stack pointer.
- vR:
- v\ã pass% = 0 ¸ 3 ⇦ 3
- vf
- P%=start%
- vp[OPT pass%
- vz1STMFD (sp)!,{R14} ; Store link on the stack.
- v☓*MOV R2,R14 ; Store link in R2.
- v‰.MOV R0,#&41 ; The –II code for "A".
- v—1MOV R1,#&5B ; The character after "Z".
- v¢/.print ; A label for BMI print.
- v¬/SWI "XOS_WriteC" ; Print character in R0.
- v¶0ADD R0,R0,#1 ; Next character into R0.
- vÀ(CMP R0,R1 ; Last character?
- vÊ0BMI print ; If not then goto print.
- vÔ$SWI "XOS_NewLine" ; <LF>, <CR>.
- vÞ$SWI "XOS_NewLine" ; <LF>, <CR>.
- vè1ADR R3,start% ; Address of start% to R3.
- vò.LDMFD (sp)!,{PC} ; Return to BASIC prog.
- vü]
- wí pass%
- w=P%
- w:
- ÿ